package com.cskaoyan.javase.oop1._7exercise._0lol;

/**
 * 完成以下案例:
 * 思考一下怎么能够找到系统中类、对象究竟是哪些？
 * 用面向对象的思想模拟LOL当中盖伦的战斗
 * 盖伦这个英雄可以看成是一个对象
 * 可以抽象出对应的,英雄类——Legend
 *
 * @since 16:34
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        // 创建盖伦这个英雄的对象
        Legend galen = new Legend("德玛西亚之力-盖伦", 1000, 0, 3150, 1, "沉默", "护盾", "爱的魔力转圈圈", "大宝剑");
        galen.fight();
    }
}

class Legend {
    String name;
    int hp;
    int mp;
    double price;
    int level;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;

    public void fight() {
        System.out.println("名字为" + name + "的英雄，正在使用技能" + skillR);
    }

    // 构造器
    public Legend() {
    }

    public Legend(String name, double price) {
        this.name = name;
        this.price = price;
    }

    public Legend(String name, int hp, int mp, double price, int level, String skillQ, String skillW, String skillE, String skillR) {
        this(name, price);
        this.hp = hp;
        this.mp = mp;
        this.level = level;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
        this.skillR = skillR;
    }
}
